home *** CD-ROM | disk | FTP | other *** search
/ Amiga Format CD 49 / Amiga Format CD49 (2000-01-17)(Future Publishing)(GB)(Track 1 of 3)[!][issue 2000-02].iso / -in_the_mag- / cb_dopus / pch581 / opus_patch580-581 < prev    next >
Text File  |  1999-12-08  |  5KB  |  207 lines

  1. ; Opus_Patch580-581
  2. ; Installer Script to update Directory Opus Magellan version 5.80 to 5.81 
  3. ;
  4. ; Directory Opus Update Version $VER: Update-Opus 80-81C  (12.06.99)
  5. ; COPYRIGHT ©1999 GP SOFTWARE, AUSTRALIA
  6.  
  7.  
  8. (complete 0)
  9.  
  10. (procedure clear_assigns
  11.  
  12.     (makeassign "DOPNEW")
  13.     (makeassign "PCH")
  14.     (makeassign "DOPOLD")
  15. )
  16.  
  17. (procedure signal_opus
  18.  
  19.     (set #Sigs (tackon #SRC "dopusmsg"))
  20.     (if (exists #Sigs (noreq))
  21.         (run (cat #Sigs " DOPUS.1 \"command set notify off\""))
  22.     )
  23. )
  24.  
  25. (procedure make_newfiles ; (#EXT) requires #EXT to be set before call
  26.  
  27.     (working "Updating modules/icon.module")
  28.     (run (cat (tackon #SRC "spatch") " -oDOPNEW:modules/icon.module -pPCH:icon.module."#EXT" DOPOLD:modules/icon.module"))
  29.  
  30.     (working "Updating modules/diskinfo.module")
  31.     (run (cat (tackon #SRC "spatch") " -oDOPNEW:modules/diskinfo.module -pPCH:diskinfo.module."#EXT" DOPOLD:modules/diskinfo.module"))
  32.  
  33.     (working "Updating modules/configopus.module")
  34.     (run (cat (tackon #SRC "spatch") " -oDOPNEW:modules/configopus.module -pPCH:configopus.module."#EXT" DOPOLD:modules/configopus.module"))
  35.  
  36.     (working "Updating modules/ftp.module")
  37.     (run (cat (tackon #SRC "spatch") " -oDOPNEW:modules/ftp.module -pPCH:ftp.module."#EXT" DOPOLD:modules/ftp.module"))
  38.  
  39.     (working "Updating modules/read.module")
  40.     (run (cat (tackon #SRC "spatch") " -oDOPNEW:modules/read.module -pPCH:read.module."#EXT" DOPOLD:modules/read.module"))
  41.  
  42.     (working "Updating modules/themes.module")
  43.     (run (cat (tackon #SRC "spatch") " -oDOPNEW:modules/themes.module -pPCH:themes.module."#EXT" DOPOLD:modules/themes.module"))
  44.  
  45.     (working "Updating modules/about.module")
  46.     (run (cat (tackon #SRC "spatch") " -oDOPNEW:modules/about.module -pPCH:about.module."#EXT" DOPOLD:modules/about.module"))
  47.  
  48.     (working "Updating libs/dopus5.library")
  49.     (run (cat (tackon #SRC "spatch") " -oDOPNEW:libs/dopus5.library -pPCH:dopus5.library."#EXT" DOPOLD:libs/dopus5.library"))
  50.  
  51.     (working "Updating DirectoryOpus")
  52.     (run (cat (tackon #SRC "spatch") " -oDOPNEW:DirectoryOpus -pPCH:DirectoryOpus."#EXT" DOPOLD:DirectoryOpus"))
  53.  
  54.  
  55. )
  56.  
  57.  
  58. (procedure wrong_version
  59.  
  60.     (message #Title_msg
  61.         "Sorry, you have the wrong version of DirectoryOpus.\n\n"
  62.         "This upgrade will NOT WORK for your version.\n"
  63.  
  64.         #README
  65.  
  66.         "Your Opus version is "#dop_ver"."#dop_rev".\n"
  67.         "and the library is "#lib_ver"."#lib_rev"\n")
  68.  
  69.     (exit "Installation terminated!")
  70.  
  71. )
  72.  
  73. (procedure anyone_home
  74.  
  75.     (message #Title_msg
  76.         "Sorry, cannot find DirectoryOpus on you system!\n\n"
  77.         #README)
  78.         
  79.     (exit "Installation terminated!")
  80.  
  81. )
  82.  
  83. (procedure wrong_dopus
  84.  
  85.         
  86.     (message #Title_msg
  87.         "Sorry, you have the wrong version of DirectoryOpus.\n\n"
  88.         "This upgrade will NOT WORK for your version.\n\n"
  89.  
  90.         #README
  91.  
  92.         "Your Opus version is "#dop_ver"."#dop_rev".\n")
  93.  
  94.     (exit "Instalation terminated!")
  95. )
  96.  
  97. ;
  98. ; start
  99. ;
  100.  
  101. (
  102. (onerror clear_assigns)
  103.  
  104.  
  105. (set #OLD_OPUS "DOpus5:")
  106. (set #FINAL "DOpus5:")
  107. (set @default-dest #FINAL)
  108.  
  109. (set #NEW_OPUS "ram:OP581")
  110. (set #PCH_TMP "ram:OPPCHTMP")
  111. (set #SRC "ram:PCH581")
  112.  
  113. (set #WANT_PRGREV 8)
  114. (set #WANT_LIBVER 68)
  115.  
  116. (set #EXT "pch81")
  117. (set #PATCHNAME "Opus8081CPatch.lha")
  118.  
  119. (set #DOPUSPROG (tackon #OLD_OPUS "DirectoryOpus"))
  120.  
  121. (set #README "Please read the ReadMe acompanying this archive or contact GPSoftware for details of upgrades\n\n")
  122.  
  123. (clear_assigns)
  124. (signal_opus)
  125.  
  126.  
  127. (makeassign "DOPOLD" #OLD_OPUS)
  128.  
  129. (makedir #NEW_OPUS)
  130. (makeassign "DOPNEW"  #NEW_OPUS)
  131.  
  132. (makedir "DOPNEW:modules")
  133. (makedir "DOPNEW:help")
  134. (makedir "DOPNEW:libs")
  135.  
  136. (makedir #PCH_TMP)
  137. (makeassign "PCH" #PCH_TMP)
  138.  
  139.  
  140. ; main procedure
  141.  
  142.  
  143.     (set #Title_msg "Directory Opus Magellan 5.81C Update Patch.\n\n")
  144.  
  145.     (message #Title_msg
  146.         "This procedure will update your existing version of"
  147.         " Directory Opus Magellan 5.80 to version  5.81.\n\n"
  148.         "When finished, you will need to reboot your Amiga.\n\n"
  149.         "The procedure will create a number of temporary "
  150.         "directories in RAM:, update your current DOpus5: "
  151.         "files then copy the new files back over your old "
  152.         "DOpus5: directory. When the process is complete, "
  153.         "reboot your Amiga and read the ReadMe_Magellan581 "
  154.         " file for details of the changes and new features."
  155.         )
  156.  
  157.     (if (exists #DOPUSPROG (noreq))
  158.         (
  159.         (set #Vernum (getversion #DOPUSPROG))
  160.         (set #Dop_ver (/ #Vernum 65536))
  161.         (set #Dop_rev (- #Vernum (* #Dop_ver 65536) ) )
  162.         );else
  163.         (anyone_home)
  164.     )
  165.  
  166.  
  167.     (if    (AND (= #dop_ver 5 ) (= #dop_rev #WANT_PRGREV ))
  168.         ( 
  169.         (if (exists (tackon #SRC #PATCHNAME))
  170.             (
  171.             (working "Unarchiving patch files...")
  172.             (run (cat (tackon #SRC "lhex") " >NIL: <NIL: -qfw=PCH: x " (tackon #SRC #PATCHNAME)))
  173.  
  174.             (make_newfiles)
  175.     
  176.             (copyfiles (source "DOPNEW:") (dest #FINAL) (all) (optional force))
  177.             (copyfiles (source (tackon #SRC "ReadMe_Magellan581")) (dest #FINAL) (infos))
  178.  
  179.  
  180.             (message #Title_msg
  181.                 "Your DirectoryOpus Magellan should now have been updated to "
  182.                 "version 5.81. To complete the installation please reboot "
  183.                 "your Amiga and then read the ReadMe_Magellan5.81 in the "
  184.                 "DOpus5: directory")
  185.             
  186.             ); else
  187.             (message #Title_msg
  188.                 "Woops! Cannot find the patch archive\n"
  189.                  "Required archive: "#PATCHNAME".\n\n"
  190.             )
  191.         )
  192.         )
  193.         (wrong_dopus) ;else
  194.     )
  195.  
  196.     ;
  197.     ; tidyup
  198.     ;
  199.  
  200.     (clear_assigns)
  201.     (run (cat "C:Delete " #PCH_TMP " all"))
  202.     (run (cat "C:Delete " #NEW_OPUS " all"))
  203.  
  204.         
  205. (clear_assigns)
  206. )
  207.